<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>个人报表</title>
{include file='header.tpl' JS=$smarty.const.BAOGG_JS CSS=$smarty.const.BAOGG_CSS}  
<script type="text/javascript">
{literal}
Ext.onReady(function(){
    var cenbterPanel = new Ext.Panel({
        tbar: [{
            "fields": ["user_id", "user_name"],
            id: "user_id",
            "submitValue": false,
            "hiddenName": "user_id",
            "displayField": "user_name",
            "mode": "remote",
            "valueField": "user_id",
            "value": "{/literal}{$user_id}{literal}",
            "triggerAction": "all",
            "hideTrigger": false,
            "forceSelection": true,  
            "allowBlank": false,
            "xtype": "combo",
            "fieldLabel": "用户",
            "anchor": "95%",
            "name": "user_id",
            "pageSize": 20,
           listConfig:{"loadingText": "searcing"},
            "minChars": 1,
            "store": new Ext.data.JsonStore({
                root: "data",
                totalProperty: "count",
                idProperty: "user_id",
                remoteSort: true,
                fields: ["user_id", "user_name"],
                proxy: new Ext.data.HttpProxy({
                    url: "{/literal}{$user_url}{literal}"
                }),
		baseParams:{"user_id": "{/literal}{$user_id}{literal}"},
		autoLoad:true
            })
        }, '|', {
            "submitValue": false,
            id: 'begin_time',
            "hiddenName": "begin_time",
            "value": "{/literal}{$begin_time}{literal}",
            "triggerAction": "all",
            "hideTrigger": false,
            "forceSelection": true,
            "allowBlank": false,
            "xtype": "combo",
            "fieldLabel": "年份",
            "anchor": "95%",
            "name": "begin_time",
            "minChars": 1,
            "store": {/literal}{$arr_year}{literal}
    
        }, '|', {
            text: "查看",
            handler: function(o){
		
                var url="{/literal}{$smarty.const.BAOGG_BASE_URL}{literal}" +(changeUrl(window.location.pathname.substring("{/literal}{$smarty.const.BAOGG_BASE_URL}{literal}".length), {
                    user_id: Ext.getCmp("user_id").getValue(),
		    action:'{/literal}{$action}{literal}',
                    begin_time: Ext.getCmp("begin_time").getValue()
                }));
		//alert(url);
		Ext.getCmp("report_content").el.dom.contentWindow.location.href=url;

            }
        }],
        region: 'center',
        id: 'centerPanel',
        items: [new Ext.ux.IFrameComponent({
            id: 'report_content',
            width: '100%',
            height: '100%',
            url: '{/literal}{$url}{literal}'
        })]
    });
    
    Ext.onReady(function(){
    
        new Ext.Viewport({
            layout: 'border',
            
            items: [cenbterPanel]
        });
	//Ext.getCmp("user_id").setValue("{/literal}{$user_id}{literal}");
        Ext.getCmp("user_id").getStore().load({params:{user_id:"{/literal}{$user_id}{literal}"},callback:function(r,opt,success){Ext.getCmp("user_id").setValue("{/literal}{$user_id}{literal}");}});
    });
});

{/literal}
</script>
</head>

<body>
<div id="center_panel"> </div>
</body>
</html>
